package org.zjt.rxjava.lession.first;

import io.reactivex.Single;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;

/**
 * Description:     一个或者零个对象
 *
 * @author juntao.zhang
 * Date: 2018-06-20 下午4:49
 * @see io.reactivex.Single
 * @see io.reactivex.Maybe
 */
@Slf4j
public class RxSingle {



    @Test
    public void main(String[] args) {
        Single<Object> objectSingle = Single.create(emitter -> emitter.onSuccess(111));
        Single<Object> objectSingle1 = Single.unsafeCreate(emitter -> emitter.onSuccess(2332));
    }



}
